<template>
	<view class="content">
		<text style="font-size: 50rpx;">子组件A</text>
		<view class="coma_box">
			<text>父组件传进来的值：</text>
			<text style="font-weight: bold;color: palevioletred;">{{intent}}</text>
		</view>
		<button type="primary" @click="sendData()">传值给ComB组件</button>
	</view>
</template>

<script>
	export default{
		props: ['intent'],
		data(){
			return {
	
			}
		},
		methods: {
			sendData() {
				console.warn("----子组件A发送数据----->", this.intent);
				uni.$emit('sendToComB', this.intent);
			}
		}
	}
</script>

<style scoped>
	.content {
		margin: 30rpx 20rpx;
		padding: 25rpx;
		border: 1px solid #b3d9ff;
		border-radius: 12rpx;
		background-color:#f5faff;
	}
	.coma_box {
		margin: 35rpx 0;
		font-size: 32rpx;
		color: #333;
	}
	button {
		width: auto;
		padding: 0 30rpx;
	}
</style>